package com.zerui.manager.accessauthorization.gateway;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zerui.cola.dto.Response;
import com.zerui.manager.access.auth.task.domain.AuthTaskDetail;
import com.zerui.manager.accessauthorization.AccessAuth;
import com.zerui.manager.web.cmd.AccessAuthQryCmd;

import java.util.List;
import java.util.Set;
/**
 * @Author wh
 * @create_time 2023-08-23 11:07
 */
public interface AccessAuthGateWay {

	Response add(AccessAuth accessAuth);

	Response update(AccessAuth accessAuth);

	AccessAuth selectById(Long id);

	Response deleteById(Long id);

	Page<AccessAuth> getPageList(AccessAuthQryCmd accessAuthQryCmd);

	/**
	 * 添加IoT门禁授权
	 *
	 * @param deviceIds          设备ID
	 * @param finalPersonnelList 人员ID
	 * @param accessAuthId       门禁授权ID
	 * @return
	 */
	String addDistribute(List<Long> deviceIds, Set<Long> finalPersonnelList, Long accessAuthId);

	/**
	 * 删除IoT门禁授权
	 * @param finalDeviceIds    设备ID
	 * @param finalPersonnelList 人员ID
	 * @return
	 */
	String delDistribute(List<Long> finalDeviceIds, Set<Long> finalPersonnelList);

	List<AccessAuth> selectAll();

	/**
	 * 添加IOT门禁设备
	 *
	 * @param iot
	 * @return
	 */
	String addIoTAuthority(AuthTaskDetail iot);

	/**
	 * 删除IOT门禁授权
	 *
	 * @param iot
	 * @return
	 */
	String delIoTAuthority(AuthTaskDetail iot);

	/**
	 * 添加ICC门禁授权
	 *
	 * @param icc
	 */
	void addICCAuthority(AuthTaskDetail icc, String personCode);

	/**
	 * 删除ICC门禁授权
	 *
	 * @param icc
	 */
	void delICCAuthority(AuthTaskDetail icc, String personCode);
}
